package sy5_2;

import java.util.Scanner;

public class Demo1 {
    public static void main(String[] args) {
       try {
            Scanner input = new Scanner(System.in);
            System.out.println("input number1,number2:");
            int number1 = input.nextInt();
            int number2 = input.nextInt();
            if (!(number1 < 0 && number1 > 100) || !(number2 < 0 && number2 > 100))
                throw new NumberRangeException("超出数据范围！");
            int result = number1 + number2;
            System.out.println("result:" + result);
        }catch (NumberRangeException e){
           System.out.println(e.getMessage());
       }

    }
}